home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group94a.txt / 000077_icon-group-sender _Mon Apr 4 13:03:45 1994.msg < prev    next >
Internet Message Format  |  1994-08-19  |  2KB

  1. Received: by cheltenham.cs.arizona.edu; Mon, 4 Apr 1994 15:28:34 MST
  2. Date: Mon, 04 Apr 1994 13:03:45 -0600 (CST)
  3. From: Chris Tenaglia - 257-8765 <TENAGLIA@MIS.MCW.EDU>
  4. Subject: 2d arrays in icon
  5. To: icon-group@cs.arizona.edu
  6. Message-Id: <01HAS0FEAPNM8WWQ0I@mis.mcw.edu>
  7. Organization: Medical College of Wisconsin (Milwaukee, WI)
  8. X-Vms-To: IN%"icon-group@cs.arizona.edu"
  9. Mime-Version: 1.0
  10. Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
  11. Content-Transfer-Encoding: 7BIT
  12. Status: R
  13. Errors-To: icon-group-errors@cs.arizona.edu
  14.  
  15.  
  16. I have done it by constructing a key using the axes and a delimiter.
  17.  
  18.        xy   := table(0)
  19.        seed := 64
  20.        every i := 1 to 10 do
  21.          every j := 1 to 10 do
  22.            xy[i||","||j] := mandel(i,j,seed)
  23.        write(xy["5,5"])
  24.  
  25. I think the delimited key is the most natural as long as you can be sure the
  26. key  representation  is  reliable  and consistent. Leading zeroes or decimal
  27. points  would cause mischief. The delimited index will also work in a string
  28. parsing array. Uniqueness is still the important factor. Case and spaces are
  29. the pitfalls in this regard. Good luck.
  30.  
  31. Chris Tenaglia (System Manager) |  "The past explained,     
  32. Medical College of Wisconsin    |   the future fortold, 
  33. 8701 W. Watertown Plank Rd.     |   the present largely appologized for."
  34. Milwaukee, WI 53226             |   Organon to The Doctor
  35. (414)257-8765                   |     
  36. tenaglia@mis.mcw.edu
  37.  
  38. > From:    IN%"thssjlb@iitmax.acc.iit.edu"  4-APR-1994 11:42:43.57
  39. > To:    IN%"tenaglia@MIS.MCW.EDU"
  40. > Subj:    Help with tw-dimensional table...
  41.  
  42. > Hello, I'm having trouble creating a two-dimensional array for parser
  43. > program I am writing.  How do I create one?  or is there another way
  44. > that is better.  Thank you for your time.
  45. > ------------------------------------------------------------------------------
  46. > | John L Buntic              | "Health nuts are going to feel stupid one day,|
  47. > | thssjlb@iitmax.acc.iit.edu |  lying in hospital beds dying of nothing."    |
  48. > | If it feels good, do it!   |                                     -Redd Foxx|
  49. > ------------------------------------------------------------------------------
  50.  
  51.